package mybatis.plus.generator;

import com.baomidou.mybatisplus.generator.FastAutoGenerator;

import java.sql.SQLException;

/**
 * 代码生成
 */
public class CodeGenerator {
    public static final String URL = "jdbc:mysql://localhost:3306/docusign?useSSL=true&useUnicode=true&characterEncoding=UTF-8&serverTimezone=UTC";
    public static final String URL_USERNAME = "root";
    public static final String URL_PASSWORD = "root123456";


    public static final String ERC_URL = "jdbc:mysql://rm-bp1482wo430r6x752.rwlb.rds.aliyuncs.com/erc?useSSL=true&useUnicode=true&characterEncoding=UTF-8&serverTimezone=UTC";
    public static final String ERC_URL_USERNAME = "oversea-dev-utc";
    public static final String ERC_URL_PASSWORD = "overseadev123!";



    public static final String DOCUSIGN_URL = "jdbc:mysql://rm-bp1482wo430r6x752.rwlb.rds.aliyuncs.com/docusign?useSSL=true&useUnicode=true&characterEncoding=UTF-8&serverTimezone=UTC";
    public static final String DOCUSIGN_URL_USERNAME = "oversea-dev-utc";
    public static final String DOCUSIGN_URL_PASSWORD = "overseadev123!";


    /**
     * 执行 run
     */
    public static void main(String[] args) throws SQLException {
        FastAutoGenerator.create(URL, "root", "root123456")
                // 全局配置
                .globalConfig(builder -> builder.outputDir("/Users/cool/code"))
                // 策略配置
                .strategyConfig(builder -> builder.addInclude("api_credentials"))
                // 执行
                .execute();
    }
}
